package StudyCode.summary.mycollection;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class CopyOfBooleanArray {
	public static boolean[] copyOf(boolean[] obj) {
		return copyOf(obj, obj.length);
	}

	public static boolean[] copyOf(boolean[] obj, int newSize) {
		boolean tempArr[] = new boolean[newSize];
		System.arraycopy(obj, 0, tempArr, 0, Math.min(obj.length, newSize));
		return tempArr;
	}
}
